#include "Tiro.h"

Tiro::~Tiro(void)
{
}

void Tiro::move(int limX, int limY)
{
	int newPosX, newPosY;
	
	if(invertX)
		newPosX = posX + 10;
	else
		newPosX = posX - 10;
	newPosY =  a * newPosX + b;

	if(newPosX < 0 || newPosX + sizeX > limX || newPosY < 0 || newPosY + sizeY > limY)
		mustDelete = true;
	else
	{
		posX = newPosX;
		posY = newPosY;
	}
}
